package com.tang.config;

import com.tang.system.vo.UserInfo;
import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.authc.AuthenticationToken;

@Getter
@Setter
public class JwtToken implements AuthenticationToken {
    private final String token;
    private UserInfo userInfo;

    public JwtToken(String token) {
        this.token = token;
    }

    @Override
    public UserInfo getPrincipal() {
        return this.userInfo;
    }

    public void setPrincipal(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
